package com.test.xshang.pattern.proxy.cglib;

import net.sf.cglib.proxy.Enhancer;
import net.sf.cglib.proxy.MethodInterceptor;

public class CglibUtil {

    public static <T> T creatProxy(T targetObj, MethodInterceptor methodInterceptor) {
        return (T)Enhancer.create(targetObj.getClass(), methodInterceptor);
    }
}
